11 LOCATE 5, 3: INPUT "GIVE VECTOR A AND ANGLE : ", VECTORA, Q1
LOCATE 7, 3: INPUT "GIVE VECTOR B AND ANGLE : ", VECTORB, Q2
LOCATE 9, 3: INPUT "GIVE VECTOR C AND ANGLE : ", VECTORC, Q3
LOCATE 11, 3: INPUT "GIVE VECTOR D AND ANGLE : ", VECTORD, Q4
LOCATE 13, 3: INPUT "GIVE VECTOR E AND ANGLE : ", VECTORE, Q5
LOCATE 15, 3: INPUT "GIVE VECTOR F AND ANGLE : ", VECTORF, Q6
LOCATE 17, 3: INPUT "GIVE VECTOR G AND ANGLE : ", VECTORG, Q7
'----------------------
CONST PI = 3.141593
A1 = Q1 * PI / 180
A2 = Q2 * PI / 180
A3 = Q3 * PI / 180
A4 = Q4 * PI / 180
A5 = Q5 * PI / 180
A6 = Q6 * PI / 180
A7 = Q7 * PI / 180
'----------------------
AX = VECTORA * COS(A1)
AY = VECTORA * SIN(A1)
BX = VECTORB * COS(A2)
BY = VECTORB * SIN(A2)
CX = VECTORC * COS(A3)
CY = VECTORC * SIN(A3)
DX = VECTORD * COS(A3)
DY = VECTORD * SIN(A3)
EX = VECTORE * COS(A3)
EY = VECTORE * SIN(A3)
FX = VECTORF * COS(A3)
FY = VECTORF * SIN(A3)
GX = VECTORG * COS(A3)
GY = VECTORG * SIN(A3)
CLS
COLOR 5, 15
LOCATE 1, 1: PRINT "GRAPH IS DRAWING..."
LOCATE 2, 1: PRINT "RED AND BOLD LINE IS THE RESULTANT VECTOR..."
COLOR 2, 15
LINE (300, 70)-(300 + AX, 70 + AY)
CIRCLE (300 + AX, 70 + AY), 5, , 2, 4, 4
CIRCLE (299 + AX, 70 + AY), 5, , 2, 4, 4
COLOR 4, 15
LINE (300 + AX, 70 + AY)-(300 + AX + BX, 70 + AY + BY)
CIRCLE (300 + AX + BX, 70 + AY + BY), 5, , 2, 4, 4
CIRCLE (299 + AX + BX, 70 + AY + BY), 5, , 2, 4, 4
COLOR 9, 15
LINE (300 + AX + BX, 70 + AY + BY)-(300 + AX + BX + CX, 70 + AY + BY + CY)
CIRCLE (300 + AX + BX + CX, 70 + AY + BY + CY), 5, , 2, 4, 4
CIRCLE (299 + AX + BX + CX, 70 + AY + BY + CY), 5, , 2, 4, 4
COLOR 6, 15
LINE (300 + AX + BX + CX, 70 + AY + BY + CY)-(300 + AX + BX + CX + DX, 70 + AY + BY + CY + DY)
CIRCLE (300 + AX + BX + CX + DX, 70 + AY + BY + CY + DY), 5, , 2, 4, 4
CIRCLE (299 + AX + BX + CX + DX, 70 + AY + BY + CY + DY), 5, , 2, 4, 4
COLOR 1, 15
LINE (300 + AX + BX + CX + DX, 70 + AY + BY + CY + DY)-(300 + AX + BX + CX + DX + EX, 70 + AY + BY + CY + DY + EY)
CIRCLE (300 + AX + BX + CX + DX + EX, 70 + AY + BY + CY + DY + EY), 5, , 2, 4, 4
CIRCLE (299 + AX + BX + CX + DX + EX, 70 + AY + BY + CY + DY + EY), 5, , 2, 4, 4
COLOR 3, 15
LINE (300 + AX + BX + CX + DX + EX, 70 + AY + BY + CY + DY + EY)-(300 + AX + BX + CX + DX + EX + FX, 70 + AY + BY + CY + DY + EY + FY)
CIRCLE (300 + AX + BX + CX + DX + EX + FX, 70 + AY + BY + CY + DY + EY + FY), 5, , 2, 4, 4
CIRCLE (299 + AX + BX + CX + DX + EX + FX, 70 + AY + BY + CY + DY + EY + FY), 5, , 2, 4, 4
COLOR 5, 15
LINE (300 + AX + BX + CX + DX + EX + FX, 70 + AY + BY + CY + DY + EY + FY)-(300 + AX + BX + CX + DX + EX + FX + GX, 70 + AY + BY + CY + DY + EY + FY + GY)
CIRCLE (300 + AX + BX + CX + DX + EX + FX + GX, 70 + AY + BY + CY + DY + EY + FY + GY), 5, , 2, 4, 4
CIRCLE (299 + AX + BX + CX + DX + EX + FX + GX, 70 + AY + BY + CY + DY + EY + FY + GY), 5, , 2, 4, 4
'RESULTANT VECTOR CIZIMI --KALIN BIR KIRMIZI CIZGI
LOCATE 4, 1: INPUT "PRESS ANY KEY TO SEE RESULTANT VECTOR...", A
LINE (299, 70)-(299 + AX + BX + CX + DX + EX + FX + GX, 70 + AY + BY + CY + DY + EY + FY + GY), 4
LINE (298, 69)-(298 + AX + BX + CX + DX + EX + FX + GX, 69 + AY + BY + CY + DY + EY + FY + GY), 4
LINE (297, 68)-(297 + AX + BX + CX + DX + EX + FX + GX, 68 + AY + BY + CY + DY + EY + FY + GY), 4
RX = AX + BX + CX + DX + EX + FX + GX
RY = AY + BY + CY + DY + EY + FY + GY
R = SQR(RX ^ 2 + RY ^ 2)
COLOR 13, 15
PRINT "RX="; RX; " RY="; RY; " R="; R
LOCATE 1, 47: COLOR 5, 15: INPUT "DO YOU WANT TO CONTINUE (Y/N) ?", CEV$: IF CEV$ = "Y" THEN GOTO 1 ELSE GOTO 100000
100000 SCREEN 0, 0, 0: COLOR 14, 12: CLS : LOCATE 8, 32: FOR I = 1 TO 25: PRINT "═"; : NEXT I: LOCATE 14, 32: FOR I = 1 TO 25: PRINT "═"; : NEXT I
FOR I = 8 TO 13: LOCATE I, 31: PRINT "║": NEXT I: FOR I = 8 TO 13: LOCATE I, 56: PRINT "║": NEXT I: